1. Field of the Invention
The invention relates to a method and system for immediately determining incorrect pixel values of a captured image and, more particularly, to a method and system for immediately determining incorrect pixel values of a captured image on an optical mouse.
2. Description of Related Art
A typical optical mouse has an image sensor. The image sensor consists of a plurality of image sensing elements. Two sequential images sensed by the image sensor are applied for detecting a motion distance of the mouse. Typically, the detection uses a portion of the first image as a search block, thereby computing a correlation of the search block and a same-size block located on the second image at a different location than the one. Accordingly, a smallest absolute value is found as the motion distance.
FIG. 1 shows an example of images in which a motion of an optical mouse is detecting. In FIG. 1, a first image 130 and a second image 110 respectively have a size of 16×16 pixels, and a search block 120 has a size of 8×8 pixels, i.e., an 8×8 image on the center of the first image 130. The center of the 8×8 image is denoted by a cross ‘X’. As shown in FIG. 1, the search block after extracted is moved to different directions for computing the correlation with the second image 110. Since motion distance of an optical mouse is associated with the motion speed of the optical mouse operated by a user. The first image 130 is typically no more than 4 pixels different from the second image 110. Thus, when computing the correlation between the search block 120 and the second image 110, the center of the search block 120 is respectively located at each circle, as denoted by an ‘O’, of the second image 110 and accordingly the correlation between the search block 120 and the second image 110 is computed. Thus, in this case, eighty-one values C1-C81 are produced to represent the correlation between the search block 120 and the second image 110. Upon the 81 values C1-C81, a respective displacement point having the optimal correlation can be found to determine the motion distance.
However, for typical algorithms used in an optical mouse, since patterns or contaminants on a mouse pad can cause a captured image to have incorrect pixel values, the incorrect pixel values may cause an estimated error as performing a motion vector estimation, and the estimated error can be accumulated to thus affect the accuracy on the motion vector estimation. Therefore, it is desirable for the above optical mouse to be improved, so as to mitigate and/or obviate the aforementioned problems.